package com.ibeeking.found.common.enums.member;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 权益内容字段 enum
 */
public enum MemberBenefitContentFieldEnum {
    /**
     * 权益内容描述
     */
    CONTENT_DESC("contentDesc"),
    /**
     * 生日权益-是否选择
     */
    BIRTHDAY_CHOOSE("birthdayChoose"),
    /**
     * 生日权益-生日月消费积分倍数
     */
    BIRTHDAY_POINTS_MULTIPLE("birthdayPointsMultiple"),
    /**
     * 生日权益-生日月送积分
     */
    BIRTHDAY_POINTS("birthdayPoints"),;


    private String value;

    MemberBenefitContentFieldEnum(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }


    public static MemberBenefitContentFieldEnum getEnumByValue(String value) {
        for (MemberBenefitContentFieldEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj;
            }
        }
        return null;
    }

    public static List<String> getChooseEnum() {
        List<String> list = new ArrayList<>();
        for (MemberBenefitContentFieldEnum enumObj : values()) {
            if (enumObj.getValue().contains("Choose")) {
                list.add(enumObj.getValue());
            }
        }
        return list;
    }
}
